// API模块统一导出文件
import { get, post, put, del, request } from './request.js'

// 导入各个模块的API
import authAPI from './modules/auth.js'
import videoAPI from './modules/video.js'
import userAnalysisResultApi from './modules/userAnalysisResult.js'
import aiGuidanceAPI from './modules/AiGuidance.js'

// 导出基础请求方法
export { get, post, put, del, request }

// 导出认证相关API
export const { 
  login, 
  register, 
  logout, 
  getUserInfo, 
  updateUserInfo, 
  changePassword 
} = authAPI

// 导出视频相关API
export const {
  uploadAndAnalyze,
  getDetailedAnalysisResult,
  getVideoPlayUrl,
  checkAnalysisStatus,
  downloadResultVideo
} = videoAPI

// 导出分析结果相关API
export const {
  getAnalysisResultById,
  getUserAnalysisResults,
  deleteAnalysisResult,
  updateAnalysisResult
} = userAnalysisResultApi

// 导出AI指导相关API
export const {
  createConversation,
  askQuestion,
  getConversation,
  getUserConversations,
  getSuggestedQuestions,
  endConversation,
  quickAsk
} = aiGuidanceAPI

// 默认导出所有API
export default {
  // 基础请求方法
  get, post, put, del, request,
  
  // 认证相关
  login, register, logout, getUserInfo, updateUserInfo, changePassword,
  
  // 视频相关
  uploadAndAnalyze, getDetailedAnalysisResult, getVideoPlayUrl, checkAnalysisStatus, downloadResultVideo,
  
  // 分析结果相关
  getAnalysisResultById, getUserAnalysisResults, deleteAnalysisResult, updateAnalysisResult,
  
  // AI指导相关
  createConversation, askQuestion, getConversation, getUserConversations, 
  getSuggestedQuestions, endConversation, quickAsk
}
